package com.bw.controller;
import com.bw.entity.TbDicti;
import com.bw.entity.vo.CompanyVo;
import com.bw.service.DictiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@SuppressWarnings("all")
public class DictiController {
    @Autowired
    private DictiService dictiService;
    //数据字典左
    @RequestMapping("dictilist")
    public List<TbDicti> dictilist(@RequestParam("mohu")String mohu){
        List<TbDicti> dictilist=dictiService.dictilist(mohu);
        System.out.println(dictilist);
        return dictilist;
    }
    //公司
    @RequestMapping("companylist")
    public List<CompanyVo> companylist(@RequestParam("mohu")String mohu){
        return dictiService.companylist(mohu);
    }
}
